package cn.secby.wms.domain;

import cn.secby.common.core.annotation.Excel;
import cn.secby.common.core.web.domain.TreeEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 地区对象 tb_area
 * 
 * @author hushuo
 * @date 2024-11-16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Area extends TreeEntity
{
    private static final long serialVersionUID = 1L;


    /** 主键ID */
    private Integer id;

    /** 省市区名字 */
    @Excel(name = "省市区名字")
    private String name;

    /** 类型 */
    @Excel(name = "类型")
    private Integer category;

    /** 排序值 */
    @Excel(name = "排序值")
    private Integer sort;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setCategory(Integer category) 
    {
        this.category = category;
    }

    public Integer getCategory() 
    {
        return category;
    }
    public void setSort(Integer sort) 
    {
        this.sort = sort;
    }

    public Integer getSort() 
    {
        return sort;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("category", getCategory())
            .append("sort", getSort())
            .append("parentId", getParentId())
            .toString();
    }
}
